<?php
include_once '../db-connection/conn.php';
include_once 'clsAdminController.php';
include_once 'submitemail.php';

$action = $_REQUEST['action'];


if($action=="image_slide_delete")
{
	$vid = $_REQUEST['id'];
	$sqlP = "DELETE FROM tbl_homepage_banners WHERE id='$vid'";
	//file_put_contents("avik-del", $sqlP);
	mysql_query($sqlP);
	echo 1;
}
else if($action=="image_slide_delete_showcase")
{
	$vid = $_REQUEST['id'];
	$sqlP1 = "DELETE FROM tbl_showcase_slideshow WHERE id='$vid'";
	mysql_query($sqlP1);
	echo 1;
}
else if($action=="save_youtube_video_data")
{
	$content = $_REQUEST['content'];
	$content = addslashes($content);
	$sqlP = "DELETE FROM tbl_youtube_homepage_data";
	mysql_query($sqlP);
	$sqlQ = "INSERT INTO tbl_youtube_homepage_data (content,is_active,modfied_on) VALUES ('".$content."','Y',now())";
	mysql_query($sqlQ);
	echo 1;
}
else if($action=="save_finance_data")
{
	$content = $_REQUEST['content'];
	$domain = $_REQUEST['domain'];
	//file_put_contents("c:\\content.txt", $content."---->>".$domain);
	$content = htmlentities(addslashes($content));
	$objdb = new bannisterDB();
	$objdb->connectdb();
	$sqlP = "DELETE FROM tbl_finance_data WHERE domain='".$domain."'";
	mysql_query($sqlP);
	$sqlQ = "INSERT INTO tbl_finance_data (content,domain) VALUES ('".$content."','".$domain."')";
	mysql_query($sqlQ);
	echo 1;
}
else if($action=="save_service_data")
{
	$content = $_REQUEST['content'];
	$domain = $_REQUEST['domain'];
	//file_put_contents("c:\\content.txt", $content."---->>".$domain);
	$content = htmlentities(addslashes($content));
	$objdb = new bannisterDB();
	$objdb->connectdb();
	$sqlP = "DELETE FROM tbl_service_data WHERE domain='".$domain."'";
	mysql_query($sqlP);
	$sqlQ = "INSERT INTO tbl_service_data (content,domain) VALUES ('".$content."','".$domain."')";
	mysql_query($sqlQ);
	echo 1;
}







